package com.kyp.basic;

import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.mapreduce.Partitioner;

public class BasicCalcGroupKeyPartitioner extends
		Partitioner<BasicCalcKey, DoubleWritable> {

	@Override
	public int getPartition(BasicCalcKey arg0, DoubleWritable arg1, int arg2) {
		int hash = arg0.getGroupColumnKey().hashCode();
		int partition = hash % arg2;
		return partition;
	}

}
